//
// Created by 麻再挺 on 2021/12/23.
//

#include "select_sort.h"

void select_sort(int arr[], int len) {
    // 遍历
    for (int i = 0; i < len - 1; ++i) {
        for (int j = i + 1; j < len; ++j) {
            if (arr[i] > arr[j]) {
                int t = arr[i];
                arr[i] = arr[j];
                arr[j] = t;
            }
        }
    }
}